package com.chuangke.common.express;

import java.util.Collection;
import java.util.List;
import java.util.Map;

public class CkEvaluatorExecutor {
	
	public static Map<String, Object> execute(List<CkExpression> expressionList, Map<String, Object> env) {
		return execute(expressionList, env,true) ;
	}
	
	public static Object execute(String expression, Map<String, Object> env) {
		return execute(expression, env,true) ;
	}
	
	public static Map<String, Object> execute(List<CkExpression> expressionList, Map<String, Object> env,boolean cached) {
		CkEvaluator cke = new CkEvaluator();
		return cke.execute(expressionList, env,cached) ;
	}
	
	public static Object execute(String expression, Map<String, Object> env,boolean cached) {
		CkEvaluator cke = new CkEvaluator();
		return cke.execute(expression, env,cached) ;
	}
	
	public static Collection<CkExpression> parse(List<CkExpression> expressionList) {
		CkEvaluator cke = new CkEvaluator();
		return cke.parse(expressionList) ;
	}
	
	public static List<String> getVariableNames(String expression) {
		return CkEvaluator.getVariableNames(expression) ;
	}
	
	public static List<String> getVariableNames(String expression,boolean cached) {
        return CkEvaluator.getVariableNames(expression,cached) ;
    }
}
